package com.gift.recommendation.modules.user.service;

import com.gift.recommendation.modules.user.dao.entity.OrderEntity;
import com.gift.recommendation.modules.user.dao.mapper.OrderMapper;
import com.gift.recommendation.modules.user.dto.OrderExpressRsp;
import com.gift.recommendation.modules.user.dto.OrderListReq;
import com.gift.recommendation.modules.user.dto.OrderMessageReq;
import com.gift.recommendation.modules.user.dto.OrderRsp;
import com.gift.recommendation.util.KdApiSearch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author zzh <2658137258@qq.com>
 * @date 2023/2/17
 */
@Component
public class OrderService {

    @Autowired
    private OrderMapper orderMapper;

    public void deleteByPrimaryKey(Long id){
        orderMapper.deleteByPrimaryKey(id);
    }

    public void insertSelective(OrderEntity order){
        orderMapper.insertSelective(order);
    }

    public List<OrderRsp> selectList(OrderListReq req) {
        return orderMapper.selectList(req);
    }

    public void updateByPrimaryKeySelective(OrderEntity order) {
        orderMapper.updateByPrimaryKeySelective(order);
    }

    public OrderExpressRsp selectExpress(OrderMessageReq req) {
        return orderMapper.selectExpress(req);
    }

    public OrderEntity selectByPrimaryKey(Long id) {
        return orderMapper.selectByPrimaryKey(id);
    }

    public List<OrderEntity> selectByExample(Example example) {
        return orderMapper.selectByExample(example);
    }

    public void updateByExampleSelective(OrderEntity order,Example example) {
        orderMapper.updateByExampleSelective(order,example);
    }
}
